<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/4/13 0013
  Time: 14:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.Map" %>
<%@ page import="org.apache.http.impl.client.CloseableHttpClient" %>
<%@ page import="org.apache.http.client.methods.HttpPost" %>
<%@ page import="org.apache.http.client.methods.CloseableHttpResponse" %>
<%@ page import="org.apache.http.impl.client.HttpClients" %>
<%@ page import="org.apache.http.util.EntityUtils" %>
<%@ page import="java.io.File" %>
<%@ page import="org.apache.http.client.methods.HttpGet" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户界面</title>
</head>
<body>

<%

    String login = (String) request.getSession().getAttribute("Loginsign");


%>
<%
    if(login=="online")
    {
        Map<String,String> isLogin = (Map<String, String>) request.getSession().getAttribute("Login");
        String namer= isLogin.get("name");
%>
</ul>
<div style="margin-left: 0px">
    <p style="margin-top: 2px;margin-right: 140px;font-size:27px;float: right"><a href="/logoutServlet">退出</a></p>
</div>
<p  style="margin-left: 0px;margin-bottom: 2px">欢迎你,<%=namer%></p>
<div>
    <p style="margin-top: 100px;margin-left: 50px"> 该用户信息：</p>
</div>
</ul>
<table border="30" style="margin-left: 50px">
    <tr>
        <th> Catalogue</th>
        <th>Substance</th>
    </tr>
    <%
        for(String key : isLogin.keySet()){
            String value = isLogin.get(key);
    %>
    <tr> <td width="120px"><%=key%></td>
        <td width="550px"><%=value%></td>
    </tr>
    <%
        }
    %>
</table>
<%
}
else{
%>
<div >
    <p style="float: right;margin-top: auto;margin-right: 140px;font-size:27px"><a href="https://cas.dgut.edu.cn?appid=javaee&state=STATE">登录</a></p>
    <p style="font-size:50px;text-align: center; line-height: 280px;">
        用户离线...请先登录用户以查看个人信息
    </p>
</div>
<%
    }
%>
<div style="position: absolute;height: 50px;text-align: center;line-height: 50px;width: 100%; bottom:50px; left:0px;">
    <p style="margin-bottom: 20px;">------东莞理工中央登陆系统信息------</p>
</div>

</body>
</html>
